package main

import "fmt"

func findMinFibonacciNumbers(k int) int {
	array := make([]int, 0)
	array = append(array, 1)
	numbsers := 0
	a, b, c := 1, 1, 1
	for c <= k {
		array = append(array, c)
		c = a + b
		a, b = b, c
	}

	le := len(array) - 1
	for k > 0 {
		for le >= 0 && k-array[le] >= 0 {
			k -= array[le]
			le--
			numbsers++
		}
		le--
	}

	return numbsers
}

func main() {
	fmt.Println(findMinFibonacciNumbers(13))
	fmt.Println(findMinFibonacciNumbers(2))
	fmt.Println(findMinFibonacciNumbers(19))
}
